<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:mycompany="http://mycompany.com/facelets"
	xmlns:fn="http://mycompany.com/functions"
	xmlns:p="http://primefaces.org/ui">
<h:body>
	<ui:composition>
		<ui:param name="bean" value="#{bean}" />

		<ui:param name="gridAnnotationResolver"
			value="#{gridBuilder[definition]}" />

		<ui:param name="columns" value="#{gridAnnotationResolver.columns}" />
		<ui:param name="grid" value="#{gridAnnotationResolver.grid}" />

		<ui:param name="id" value="#{gridId != null ? gridId : grid.id}" />

		<ui:param name="selectable"
			value="#{selectable != null ? selectable : grid.selectable}" />

		<ui:param name="selectionMode"
			value="#{selecttionMode != null ? selectionMode : grid.selectionMode }" />

		<p:dataTable var="row" value="#{bean.list}" id="#{id}"
			selection="#{bean.selection}" rowKey="#{row.id}"
			selectionMode="#{selectionMode}">

			<p:columns value="#{columns}" var="column">
				<f:facet name="header">
					#{language[column.label]}
				</f:facet>
				<h:outputLabel value="#{row[column.field]}" />
			</p:columns>
		</p:dataTable>

	</ui:composition>
</h:body>
</html>